#ifndef EMLEVELOP_H
#define EMLEVELOP_H

#include "FiniteDiff/LevelOp.h"
#include "Embedded/EmbeddedGrid.h"

template <int Dim>
class EmLevelOp : public LevelOp<Dim>
{
public:
  using BaseClass = LevelOp<Dim>;
  using EmGrid    = EmbeddedGrid<Dim>;
  using iVec      = Vec<int, Dim>;

  EmLevelOp(const EmGrid &aGrid)
      : BaseClass(aGrid), emGrid(aGrid)
  {
  }

  Real NRM(const Tensor<Real, Dim> &aData, int staggered, int p) const;

  void copyGhosts(const Tensor<Real, Dim> &aSrc, Tensor<Real, Dim> &aDest) const;

  void zeroExtNodes(Tensor<Real, Dim> &aData, bool zeroGhosts = true) const;

  void zeroExtNodes(Tensor<Real, Dim+1> &aData, bool zeroGhosts = true) const;

protected:
  const EmGrid &emGrid;
};

#endif //EMLEVELOP_H
